package com.ruoyi.project.knowledge.standard.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.knowledge.standard.mapper.KnowledgeIndustryStandardMapper;
import com.ruoyi.project.knowledge.standard.domain.KnowledgeIndustryStandard;
import com.ruoyi.project.knowledge.standard.service.IKnowledgeIndustryStandardService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 行业规范信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-27
 */
@Service
public class KnowledgeIndustryStandardServiceImpl implements IKnowledgeIndustryStandardService 
{
    @Autowired
    private KnowledgeIndustryStandardMapper knowledgeIndustryStandardMapper;

    /**
     * 查询行业规范信息
     * 
     * @param id 行业规范信息主键
     * @return 行业规范信息
     */
    @Override
    public KnowledgeIndustryStandard selectKnowledgeIndustryStandardById(Long id)
    {
        return knowledgeIndustryStandardMapper.selectKnowledgeIndustryStandardById(id);
    }

    /**
     * 查询行业规范信息列表
     * 
     * @param knowledgeIndustryStandard 行业规范信息
     * @return 行业规范信息
     */
    @Override
    public List<KnowledgeIndustryStandard> selectKnowledgeIndustryStandardList(KnowledgeIndustryStandard knowledgeIndustryStandard)
    {
        return knowledgeIndustryStandardMapper.selectKnowledgeIndustryStandardList(knowledgeIndustryStandard);
    }

    /**
     * 新增行业规范信息
     * 
     * @param knowledgeIndustryStandard 行业规范信息
     * @return 结果
     */
    @Override
    public int insertKnowledgeIndustryStandard(KnowledgeIndustryStandard knowledgeIndustryStandard)
    {
        knowledgeIndustryStandard.setCreateTime(DateUtils.getNowDate());
        return knowledgeIndustryStandardMapper.insertKnowledgeIndustryStandard(knowledgeIndustryStandard);
    }

    /**
     * 修改行业规范信息
     * 
     * @param knowledgeIndustryStandard 行业规范信息
     * @return 结果
     */
    @Override
    public int updateKnowledgeIndustryStandard(KnowledgeIndustryStandard knowledgeIndustryStandard)
    {
        return knowledgeIndustryStandardMapper.updateKnowledgeIndustryStandard(knowledgeIndustryStandard);
    }

    /**
     * 批量删除行业规范信息
     * 
     * @param ids 需要删除的行业规范信息主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeIndustryStandardByIds(String ids)
    {
        return knowledgeIndustryStandardMapper.deleteKnowledgeIndustryStandardByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除行业规范信息信息
     * 
     * @param id 行业规范信息主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeIndustryStandardById(Long id)
    {
        return knowledgeIndustryStandardMapper.deleteKnowledgeIndustryStandardById(id);
    }
}
